﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Configuration;
using xbmc_json_async_test_winform.Properties;

namespace xbmc_json_async_test_winform
{
    /// <summary>
    /// XBMC Connection Settings
    /// </summary>
    internal class XbmcSettings
    {

        /// <summary>
        /// Initializes a new instance of the <see cref="XbmcSettings"/> class.
        /// </summary>
        public XbmcSettings()
        {
 
        }
        
        /// <summary>
        /// Gets or sets the XBMC ip address.
        /// </summary>
        /// <value>
        /// The XBMC ip address.
        /// </value>
        public string XbmcIpAddress
        {
            get
            {
                return Settings.Default.XbmcIpAddress;
            }
            set
            {
                Settings.Default.XbmcIpAddress = value;
                Settings.Default.Save();
            }
        }

        /// <summary>
        /// Gets or sets the XBMC ip port.
        /// </summary>
        /// <value>
        /// The XBMC ip port.
        /// </value>
        public int XbmcIpPort
        {
            get
            {
                return Settings.Default.XbmcIpPort;
            }
            set
            {
                Settings.Default.XbmcIpPort = value;
                Settings.Default.Save();
            }
        }
        
        /// <summary>
        /// Gets or sets the XBMC event port.
        /// </summary>
        /// <value>
        /// The XBMC event port.
        /// </value>
        public int XbmcEventPort
        {
            get
            {
                return Settings.Default.XbmcEventPort;
            }
            set
            {
                Settings.Default.XbmcEventPort = value;
                Settings.Default.Save();
            }
        }

        /// <summary>
        /// Gets or sets the name of the XBMC user.
        /// </summary>
        /// <value>
        /// The name of the XBMC user.
        /// </value>
        public string XbmcUserName
        {
            get
            {
                return Settings.Default.XbmcUserName;
            }
            set
            {
                Settings.Default.XbmcUserName = value;
                Settings.Default.Save();
            }
        }

        /// <summary>
        /// Gets or sets the XBMC user password.
        /// </summary>
        /// <value>
        /// The XBMC user password.
        /// </value>
        public string XbmcUserPassword
        {
            get
            {
                return Settings.Default.XbmcUserPassword;
            }
            set
            {
                Settings.Default.XbmcUserPassword = value;
                Settings.Default.Save();
            }
        }
    }
}
